import Vue from 'vue'
import { $POST, $DELETE, $PUT, $GET, $UploadFile } from '__UTILS__/http_request/request-method.js'
import VueConfig, {preffix} from '__CONFIG__/vue-config.js'
const disposeResFunName = VueConfig[preffix + 'REQUEST_DISPOSE'].name //获取到处理返回结果函数名
const disposeResFun = Vue.prototype[disposeResFunName] // 获取到了处理函数


//通过邮箱 发送注册验证码
export function createUserCode(email) {
  const API = 'email/create_user_code'
  return $POST(API, { email }, disposeResFun)
}

//通过邮箱 发送登入验证码
export function vertifyUserCode(vertify) {
  const API = 'email/vertify_user_code'
  return $POST(API, { vertify }, disposeResFun)
}

//通过邮箱 发送登入验证码
export function findPasswordCode(vertify) {
  const API = 'email/find_password_code'
  return $POST(API, { vertify }, disposeResFun)
}